import { postFormData, post } from "@/utils/request";

/**
 * 项目流程模版
 */
export const http_project_process_template = {
  getCategory: params =>
    postFormData("/ProjectProcessConfig/getFatherProcess", params),
  page: params => postFormData("/ProjectProcessConfig/getProcess", params),
  getNodesByCategory: params =>
    postFormData("/flowLayout/specificMatters/query", params),
  read: params => postFormData("/flowLayout/templateMatters/query", params),
  create: params => post("/ProjectProcessConfig/addProcess", params)
};

/**
 * 项目流程配置
 */
export const http_project_process = {
  read: params => postFormData("/flowLayout/projectMatters/query", params),
  updateCanvas: params => post("/flowLayout/projectMatters/save", params),
  updateDate: data => post("/flowLayout/projectMatters/setTime", data),
  updateType: data => post("/ProductMatter/updateMatterStatus", data)
};
